// dlg.txt

//		mark_quest_dest(zone,x,y,layer,quest);
//		cancel_out_fight(0,short kill_enc);
//		make_outdoor_enc(short x,short y,short which_enc);
//		set_out_fight_field(short which_field);
// 				which_field is 0-20

begintalkscript;

variables;

short this_sec = 17;

begintalknode;
	tag = 1;
	condition = get_sdf(100 + this_sec,1) == 0;
	text1 = "You find a body here. A human wearing robes. It is hard to make out more details, as the poor fellow was incinerated from above.";
	text2 = "You decline to poke around the charred remains. However, you find a scroll tube nearby, discarded and forgotten in a mushroom patch. You take it.";
	code =
		sf(100 + this_sec,1,1);
		change_crafting(0,1,0,0,0);
	break;
	
begintalknode;
	tag = 2;
	condition = get_sdf(100 + this_sec,2) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,2,1);
	break;

begintalknode;
	tag = 3;
	condition = get_sdf(100 + this_sec,3) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,3,1);
	break;

begintalknode;
	tag = 4;
	condition = get_sdf(100 + this_sec,4) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,4,1);
	break;

begintalknode;
	tag = 5;
	condition = get_sdf(100 + this_sec,5) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,5,1);
	break;

begintalknode;
	tag = 6;
	condition = get_sdf(100 + this_sec,6) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,6,1);
	break;

begintalknode;
	tag = 7;
	condition = get_sdf(100 + this_sec,7) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,7,1);
	break;

begintalknode;
	tag = 8;
	condition = get_sdf(100 + this_sec,8) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,8,1);
	break;

begintalknode;
	tag = 9;
	condition = get_sdf(100 + this_sec,9) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,9,1);
	break;

begintalknode;
	tag = 10;
	condition = get_sdf(100 + this_sec,10) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,10,1);
	break;

begintalknode;
	tag = 11;
	condition = get_sdf(100 + this_sec,11) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,11,1);
	break;

begintalknode;
	tag = 12;
	condition = get_sdf(100 + this_sec,12) == 0;
	text1 = "__";
	code =
		sf(100 + this_sec,12,1);
	break;

// MIXED

begintalknode;
	tag = 13;
	condition = 1;
	text1 = "The conclave of the eye beasts has been destroyed. You will never know what they were plotting. However, considering the treacherous, voracious nature of these creatures, it can't have been good.";
	text2 = "You don't find any treasure. Their treasures are treasures of the mind. However, you note that one of them has one gleaming eye.";
	text3 = "You look closer and find that one of them has a fake eye. It's a round, glowing crystal, etched with odd symbols. You keep it.";
	code =
		reward_give(491);
	break;
	
begintalknode;
	tag = 14;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 15;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 16;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 17;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 18;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 19;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 20;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 21;
	condition = 1;
	text1 = "__";

begintalknode;
	tag = 22;
	condition = 1;
	text1 = "__";

////

begintalknode;
	tag = 30;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "You find a small colony of Ro miners, come down into the underworld to seek their fortunes. Somehow, they have survived the beasts in the swamp to the south. They are heavily armed, and they draw their blades as soon as you come into view.";
	text2 = "When they see who you are, they lower their weapons. Their leader approaches to speak with you.";
	text3 = "You return to the miner camp. Once again, their leader approaches to speak with you.";
	text4 = "_Welcome, traveler. We are miners of the Ro and we have had good fortune. Care to trade? It keeps us from bearing our burden back to the surface._";
	code =
		if (gf(117,11) == 0) {
			sf(117,11,1);
			rs(3);
			}
			else {
				rs(1); rs(2);
				}
	break;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_Can you tell me anything about these caves?_";
	text1 = "They look at each other. Their leader says, _There are lots of terrors here. We don't explore. We got here through a hidden tunnel to the northwest. Very hard to find it from the surface. Too much cold and ice._";
	
begintalknode;
	state = 10;
	nextstate = -1;
	condition = gf(80,16) < 116;
	question = "_I would like to trade._";
	text1 = "The miners start to get their wares, but one of them steps forward. _Stop. I have heard of this person. A [P] of Haven, who has not been a friend to our people._";
	text2 = "They move off and have a long argument. Finally, they return. Their leader says, _I was wrong. We have had no luck. We have nothing to sell. I apologize. Please move on._ You are forced to depart.";
	action = END_TALK;
	
begintalknode;
	state = 10;
	nextstate = 11;
	condition = gf(80,16) >= 116;
	question = "_I would like to trade._";
	text1 = "The miners pull out long wooden trays full of precious metal and stones.";
	text2 = "Their leader adds, _We could get more. However, we are terrorized by the queen of the eye beasts, in the forest to the south. If that horror was dead, we could make more things available._";
	text3 = "Their leader adds, _Since the queen of the eye beasts is dead, I will honor you by selling you our more precious stones._";
	code =
		if (gf(117,12) == 0)
			rs(3);
			else rs(2);
	break;

begintalknode;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "_No, thank you._";
	text1 = "You bid farewell and peacefully depart.";
	action = END_TALK;
	
begintalknode;
	state = 11;
	nextstate = -1;
	condition = gf(117,12) == 0;
	question = "_Queen of the eye beasts?_";
	text1 = "_Those horrors float around in the woods to the south. They are not natural hunters. They leave us alone while we are here._";
	text2 = "_However, they limit where good miners of the Ro can look for gems and the like. If you can destroy them, you would be doing us a service._";

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_What can I buy?_";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Hidden Miners",
		  "shopdesc.",
		  43,0,0);	
	break;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = gf(117,12) > 0;
	question = "_Let me see your special goods._";
	text1 = "You conclude your business.";	
	code = 
		begin_shop_mode("Hidden Miners",
		  "shopdesc.",
		  44,0,0);	
	break;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_I want to sell something._";
	text1 = "You conclude your business.";	
	code = 
		start_alter_items(0);
	break;

begintalknode;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "_That is all._";
	text1 = "The miners are short on supplies. They apologize for having no meal to share. You bid them farewell and move on.";
	action = END_TALK;
	
	
//

begintalknode;
	tag = 40;
	state = -1;
	nextstate = 40;
	condition = 1;
	question = "Name";
	text1 = "In the middle of this stone circle, deep in the fungal forest, you see an astonishing sight. There are many sages in Haven who would give everything to witness this.";
	text2 = "There is a circle of eye beasts, floating together. They stare at each other perfectly silently. Their bodies are still, but their eyestalks flail around frantically.";
	text3 = "Then ... wait. They are not silent. Little by little, you start to hear their voices. Their minds are speaking. No, not speaking. Screaming. Each of them is projecting a dozen voices, bombarding each other with sound. Somehow, you hear a tiny fraction of it. If you heard all of it, it would likely drive you mad.";
	text4 = "They must be aware of your presence, but they don't react.";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "_Hello._";
	text1 = "There is no response.";

begintalknode;
	state = 40;
	nextstate = 41;
	condition = 1;
	question = "Think at them.";
	text1 = "You concentrate, trying to add your mental voice to their cacophony. This gets an immediate reaction: A burst of mental energy that throws you back and gives you an instant, splitting headache.";
	text2 = "Happily, you survive it.";
	text3 = "At least you have their attention. They are all looking at you.";

begintalknode;
	state = 40;
	nextstate = -1;
	condition = 1;
	question = "Just leave.";
	text1 = "They let you walk away unharmed.";
	action = END_TALK;
	code =
		cancel_out_fight(0,0);
	break;
	
begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_Why are you here?_";
	text1 = "Many voices inside your head. Then one stands out. _We come together to hear the multitudes. Share learning. Plan._";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_I would like to deal with you._";
	text1 = "In your head, _No,_ repeated many times. One voice says, _This is our land. When the war above concludes, we might deal with the victor._";
	text2 = "";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_What do you think of Haven?_";
	text1 = "_Just humans humans humans humans. You will all be dead soon enough. You will all crumble. You are not important._";

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_I don't like pests in my lands._ Attack.";
	text1 = "The communion of the eye beasts has been brought to an end. The strange creatures rotate and direct their fury toward you.";
	action = END_TALK;
	code =
		set_out_fight_field(11);
	break;

begintalknode;
	state = 41;
	nextstate = -1;
	condition = 1;
	question = "_I'll just leave you to it, then._";
	text1 = "You detect a palpable sense of relief. They let you walk away unharmed.";
	action = END_TALK;
	code =
		cancel_out_fight(0,0);
	break;



	
//

begintalknode;
	tag = 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

begintalknode;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";


//

begintalknode;
	tag = 100;
	state = -1;
	nextstate = 100;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 100;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 130;
	state = -1;
	nextstate = 130;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 130;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";

//

begintalknode;
	tag = 160;
	state = -1;
	nextstate = 160;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 160;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
		
//

begintalknode;
	tag = 190;
	state = -1;
	nextstate = 190;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode;
	state = 190;
	nextstate = -1;
	condition = 1;
	question = "__";
	text1 = ".";
	text2 = "";
				